The present disclosure relates to an image forming apparatus which collects a log on occurrence of a fault.
There are systems that include a microprocessor. The microprocessor may stop due to noise or a defect in software. When the microprocessor stops, the entire system may stop. The stopped system may be recovered automatically using a watchdog timer. Of a recovery system using the watchdog timer, one example as described below is known.
Specifically, an automatic fault recovery system that performs error history recording processing is described which, by using a microprocessor, detects a runaway in the system using a watchdog timer to initialize the system, records an operation history of software, detects that the watchdog timer has operated based on a watchdog timer flag, divides software in function blocks to control the operation, detects that error processing has been performed based on a restart flag, records an error history of the system, refers to the watchdog timer flag when a hardware reset occurs, sets the restart flag to perform the process immediately before the reset if the reset is based on the watchdog timer, detaches from the system the process immediately before the reset if, after restarting, the watchdog timer operates again, records the detached process name and then moves to normal operation, records that an error has occurred due to an external disturbance and then moves to normal operation if the process finishes without operation of the watchdog timer. With this configuration, when a runaway occurs in the system, the location of a fault is detected to be recorded, and restarting is tried by detaching the location of the fault.
In the microprocessor, a fault (freeze, lock, runaway) may occur. In a fault state, for example, processing and signal transmission and reception stop. Or, the apparatus including the microprocessor stops responding. The cause of a fault varies. A fault may occur due to a bug included in software. A fault may occur due to an external factor such as noise. The cause may be the processing that precedes the processing during which a fault has occurred.
When a detailed operation history (the processing status at a stop) can be checked, it will help to find the cause of a fault. Here, based on a program or data read to a RAM, the microprocessor may perform processing. When the stored contents in the RAM connected to the microprocessor can be checked, the status during a fault or the cause of a fault may be found. However, in a state where the microprocessor is stopped, it is not possible to read data from the RAM. Inconveniently, it is then impossible, even When attempted, to record the stored contents in the RAM.
With the known technology mentioned above, it is possible only to judge whether the cause of a fault is due to software or an external disturbance (noise). Also, software is divided into function blocks. The process controller operates such that the process immediately before the reset (software block) is performed. The incidence of a fault is not necessarily 100%. If, execution of the process immediately before the reset after restarting proceeds without a problem, the wrong cause of a fault is recorded. Also, When the cause is in a process preceding the process immediately before the reset, the cause cannot be found. With the known technology mentioned above, it is difficult to find the cause of a fault correctly.